<template>
  <div class="admin-container">
    <header class="admin-header">
      <h1 class="admin-main-title">管理员说明页</h1>
      <div class="admin-identity">当前身份：系统管理员</div>
    </header>

    <main class="admin-main">
      <section class="admin-privilege">
        <h2 class="admin-section-title">管理员权限说明</h2>
        <ul class="privilege-list">
          <li>全站最高操作权限</li>
        </ul>
      </section>

      <section class="management-section">
        <h2 class="admin-section-title">核心管理功能</h2>
        <div class="management-grid">
          <router-link to="/manage/user/" class="management-card">
            <span class="icon">➕</span>
            <h3>创建新题目</h3>
          </router-link>

          <router-link to="/manage/question/" class="management-card">
            <span class="icon">📝</span>
            <h3>题目管理</h3>
          </router-link>

          <router-link to="/add/competition" class="management-card">
            <span class="icon">🏆</span>
            <h3>创建竞赛</h3>
          </router-link>

          <router-link to="/manage/competition/" class="management-card">
            <span class="icon">📋</span>
            <h3>竞赛管理</h3>
          </router-link>

          <router-link to="/manage/user/" class="management-card">
            <span class="icon">👥</span>
            <h3>用户管理</h3>
          </router-link>
        </div>
      </section>
    </main>
  </div>
</template>

<script>
export default {
  name: "AdminDashboard",
  mounted() {
    // 可在此处添加权限验证逻辑
  },
};
</script>

<style scoped>
.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-header {
  text-align: center;
  margin-bottom: 3rem;
}

.admin-main-title {
  color: #2c3e50;
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.admin-identity {
  color: #e74c3c;
  font-weight: 600;
  font-size: 1.2rem;
}

.admin-section-title {
  color: #34495e;
  font-size: 1.8rem;
  margin: 2rem 0;
  border-left: 4px solid #42b983;
  padding-left: 1rem;
}

.privilege-list {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.privilege-list li {
  line-height: 1.8;
  color: #4a5568;
  margin: 1rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.privilege-list li::before {
  content: "•";
  color: #42b983;
  position: absolute;
  left: 0;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.management-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.management-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #42b983;
}

.management-card h3 {
  color: #2c3e50;
  margin: 1rem 0 0;
  font-size: 1.2rem;
}

.icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .management-grid {
    grid-template-columns: 1fr;
  }

  .admin-main-title {
    font-size: 2.2rem;
  }
}
</style>
